
define(function (require, exports, module) {
    FXREADER.CommentAnnotHandler = function (pReaderApp,annotType,name,pCommentAnnotPlugin) {
    	this.pReaderApp = pReaderApp;
    	this.annotType = annotType;
    	this.pCommentAnnotPlugin = pCommentAnnotPlugin;
    };
    
    FXREADER.CommentAnnotHandler.prototype =
    {
    	GetType: function () { return this.annotType; },
    	        
    	CanAnswer: function(pAnnot)
    	{
    		var type = pAnnot.GetType();
    		if (!this.pCommentAnnotPlugin.IsCommentsType(type))
    			return false;
    		if (this.pReaderApp.IsCurrentHandTool() && pAnnot.IsVisable())
    			return true;
    		var pTool = this.pReaderApp.GetCurToolHandler();
    		if (pTool != null)
    		{
    			var csToolName = pTool.Tool_GetName();
    			//if(type != this.annotType && csToolName != COMMENTTYPE_REPLACE)
    			//	return false;
    			if (csToolName === FXREADER.BA_SELANNOT_TOOLNAME)
    			{
    				return true;
    			}
    		}
    		return false;
    	},
    	        
    	OnSelected: function(pAnnot){}
    };



    return FXREADER.CommentAnnotHandler;
});